package org.example.StacksAndQueues;

import java.util.ArrayDeque;
import java.util.LinkedList;

public class Using_queues_to_implement_stacks {
    public static void main(String[] args) {
        //用队列实现栈

        //测试类
        MyStack myStack = new MyStack();
        myStack.push(1);
        myStack.push(2);
        myStack.push(3);
        myStack.push(4);
        myStack.push(5);
        System.out.println(myStack.pop());
        System.out.println(myStack.top());
        System.out.println(myStack.pop());
        System.out.println(myStack.empty());
    }
}
